package com.springCloudStudy.controller;


import com.commons.interfaces.entities.Payment;
import com.commons.interfaces.interfaces.OpenfeignClientInterface;
import com.commons.interfaces.utils.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 * @PROJECT_NAME: SpringCloud_AtGuiGu
 * @NAME: OpenfeignController
 * @Author: lidongming
 * @DATE: 2022/2/10
 * @Desc:
 */

@RestController
public class OpenfeignController {

    @Resource
    OpenfeignClientInterface oci;

    @GetMapping("/payment/{id}")
    public ResponseData<Payment>queryById(@PathVariable Integer id){
        return oci.queryById(id);
    }
}
